package com.bracelet.Enum;

/*
* 手环设备数据的交易码
* */
public enum SeviceId {
    UD("UD","位置上报","com.bracelet.pojo.server.LocationDataReporting"),
    UD2("UD2","位置上报2","com.bracelet.pojo.server.LocationDataReporting");

    private String key;
    private String name;
    private String className;

    SeviceId(String key, String name,String className) {
        this.key = key;
        this.name = name;
        this.className = className;
    }

    public static String getName(String keys) {
        for (SeviceId c : SeviceId.values()) {
            if (c.getKey().equals(keys)) {
                return c.name;
            }
        }
        return null;
    }
    public static String getClass(String keys) {
        for (SeviceId c : SeviceId.values()) {
            if (c.getKey() .equals(keys)) {
                return c.className;
            }
        }
        return null;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }
}
